//
//  HHUserProtocol.h
//  InternetHospital
//
//  Created by chun.chen on 2022/2/14.
//  Copyright © 2022 HC. All rights reserved.
// 用户协议

#import <Foundation/Foundation.h>


NS_ASSUME_NONNULL_BEGIN

@class HHUserCenter;
@class HHUserIdentites;
@class HHUserModel;

@protocol HHUserDelegate <NSObject>

@optional


/// 用户登录成功
/// @param center 用户中心
/// @param uid 用户Id
- (void)userCenter:(HHUserCenter *)center didLoginSuccess:(NSString * )uid;

/// 用户登录失败
/// @param center 用户中心
/// @param error 错误信息
- (void)userCenter:(HHUserCenter *)center loginFailed:(NSError * )error;

/// 用户登出
/// @param center 用户中心
/// @param uid 用户Id
- (void)userCenter:(HHUserCenter *)center didLogout:(NSString *)uid;

/// 用户被提出
/// @param center 用户中心
/// @param uid 用户Id
/// @param message 信息
- (void)userCenter:(HHUserCenter *)center kickedout:(NSString * )uid message:(NSString *)message;

/// 用户信息更新
/// @param center 用户中心
/// @param uid 用户Id
- (void)userCenter:(HHUserCenter *)center infoUpdate:(NSString * )uid;

@end

@protocol HHUserConfigProtocol <NSObject>

@optional

/// 用户初始配置
- (void)hh_userSetup;
/// 是否需要同步环信登录
/// @note:  设置YES则登录成功后调取环信接口 环信登录成功够算一次登录成功
- (BOOL)synchroniseHuanxinLogin;

/// 是否同步用户信息
/// @note：设置YES 登录成功后调用用户信息接口 更新用户信息
- (BOOL)synchroniseUserData;

///MARK: - URL
/// 获取登陆key
- (NSString *)userGenLoginKeyURL;
/// 获取公钥
- (NSString *)userGetPublicKeyURL;
/// 登录的url
- (NSString *)userLoginURL;
/// 个人中心
- (NSString *)userCenterURL;
/// 发送短信验证码
- (NSString *)sendSmsURL;
/// 验证码登录
- (NSString *)validLoginURL;

///MARK: - KEY
////// 用户数据key
- (NSString *)userDataKey;

/// 用户身份信息key
- (NSString *)userIdenitiesKey;
/// 用户短信秘钥key
- (NSString *)userSmsSecretKey;



@end

NS_ASSUME_NONNULL_END
